home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / language / j32.sit / j.rsrc / TEXT_1502_{.txt < prev    next >
Text File  |  1991-06-13  |  1KB  |  34 lines

  1. {  (Verb)
  2.  
  3. CATALOGUE (1)  {y forms a catalogue from the atoms of its  arguments, its shape being the chain of the shapes of the opened items of y, and the common shape of the boxed results is $y. The case {a;<b is called the Cartesian product of a and b. Thus:
  4.  
  5.       c=. {'ht';'ao';'gtw'            
  6.       n=. { 10 11 ; i.2 3 
  7.       c                           n 
  8. +---+---+---+   +----+----+----+
  9. |hag|hat|haw|   |10 0|10 1|10 2|
  10. +---+---+---+   +----+----+----+
  11. |hog|hot|how|   |10 3|10 4|10 5|
  12. +---+---+---+   +----+----+----+    
  13. +---+---+---+   +----+----+----+
  14. |tag|tat|taw|   |11 0|11 1|11 2|
  15. +---+---+---+   +----+----+----+
  16. |tog|tot|tow|   |11 3|11 4|11 5|
  17. +---+---+---+   +----+----+----+
  18.    $c              $n
  19. 2 2 3           2 2 3
  20.  
  21. FROM (0 _)  If x is an integer in the range from ΓÇô#y to <:#y, then x{y selects item (#y)|x from y. More generally, x may be a boxed list, whose successive elements are (possibly) boxed lists that specify selection along successive axes of y. For example:
  22.  
  23.       y                        2 0{y
  24. abcdef                   mnopqr
  25. ghijkl                   abcdef
  26. mnopqr
  27.       (<2 0){y        (<2 0;1 3){y
  28. m                           np
  29.                             bd
  30.  
  31. Finally, if any r=.>j{>x used in the selection  is itself boxed,  selection is made by the indices along that axis (i.j{$y) that do not occur in >r. For example:
  32.  
  33.    (<(<<2 0),(<<1 3)){y
  34. gikl